Generating a KML heatmap from given data set of [lat, lon, density]

Posted by Will Croft on Stack Overflow See other posts from Stack Overflow or by Will Croft
Published on 2010-03-05T20:05:29Z Indexed on 2010/03/31 20:03 UTC
Read the original article Hit count: 848

Filed under:
|

I am looking to build a static KML (Google Earth markup) file which displays a heatmap-style rendering of a few given data sets in the form of [lat, lon, density] tuples.

A very straightforward data set I have is for population density.

My requirements are:

  • must be able to feed in data for a given lat, lon
  • must be able to specific the given density of the data at that lat, lon
  • must export to KML

The requirements are language agnostic for this project as I will be generating these files offline in order to build the KML used elsewhere.

I have looked at a few projects, most notably heatmap.py, which is a port of gheat in Python with KML export. I have hit a brick wall in the sense that the projects I have found to date all rely on building the heatmap from the density of [lat, lon] points fed into the algorithm.

If I am missing an obvious way to adapt my data set to feed in just the [lat, lon] tuples but adjusting how I feed them using the density values I have, I would love to know!

© Stack Overflow or respective owner

Related posts about kml

Related posts about heatmap